/*
 * @Descripttion: 
 * @version: 
 * @Author: 侯勇
 * @Date: 2022-10-24 21:00:47
 * @LastEditors: 侯勇
 * @LastEditTime: 2022-10-28 21:57:59
 */
import React from 'react'
import { Redirect } from "react-router-dom";


import HyDiscover from "@/pages/discover";
import HyFriend from "@/pages/friend";
import HyMine from "@/pages/mine";
import RankingList from '@/pages/discover/component/rankingList'
import Recommend from '@/pages/discover/component/recommend'
import Songs from '@/pages/discover/component/songs'
import Djradio from '../pages/discover/component/djradio'
import Artist from '../pages/discover/component/artist'
import NewDisc from '../pages/discover/component/newDisc'


const routes = [
    {
        path: '/',//默认路径
        exact: true,
        //路由重定向
        render: () => (
            <Redirect to="/discover" />
        )


    },
    {
        path: '/discover',
        component: HyDiscover,
        routes: [
            {
                path: '/discover',//默认路径
                exact: true,
                //路由重定向
                render: () => (
                    <Redirect to="/discover/recommend" />
                )
            },
            {
                path: '/discover/ranking',
                component: RankingList
            },
            {
                path: '/discover/recommend',
                component: Recommend
            },
            {
                path: '/discover/songs',
                component: Songs
            },
            {
                path: '/discover/djradio',
                component: Djradio
            },
            {
                path: '/discover/artist',
                component: Artist
            },
            {
                path: '/discover/album',
                component: NewDisc
            },

        ]
    },

    {
        path: '/mine',
        component: HyMine
    },
    {
        path: '/friend',
        component: HyFriend
    },
];

export default routes;